Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Param.id public #1859

Merged
merged 2 commits into from
Jun 6, 2024
Merged

Make Param.id public #1859

merged 2 commits into from
Jun 6, 2024

Conversation

ArthurBrussee
Copy link
Contributor

Pull Request Template

Checklist

  • [ x] Confirmed that run-checks all script has been executed.
  • [ x] Made sure the book is up to date with changes in this PR.

Changes

Make param id public. This can help to setup custom optimizers (by splitting of gradients for a specific param), and has had some more requests..

This could also just be a getter, replacing the id seems a bit wild but might be valid for advanced use cases.

It's also already pseudo public, as it's possible to do something like

// read:
let (id, val) = param.comsume()
// "write":
let param = ParamID::new(id, val);

Copy link
Member

@laggui laggui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 👏 👏

Copy link

codecov bot commented Jun 6, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 86.28%. Comparing base (d28183c) to head (30681a7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1859   +/-   ##
=======================================
  Coverage   86.28%   86.28%           
=======================================
  Files         774      774           
  Lines       90095    90095           
=======================================
  Hits        77740    77740           
  Misses      12355    12355           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@laggui laggui merged commit 675f6b3 into tracel-ai:main Jun 6, 2024
14 checks passed
@laggui laggui mentioned this pull request Jun 6, 2024
@ArthurBrussee ArthurBrussee deleted the public_param_id branch June 6, 2024 15:46
L-M-Sherlock pushed a commit to open-spaced-repetition/burn that referenced this pull request Oct 28, 2024
* Make Param.id public

* Remove extra comment.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants